Repository navigation
Invitations, organization settings and an organization of one's own in the app - #1700
Closed
davidmckayv wants to merge 9 commits into
Closed
davidmckayv wants to merge 9 commits into
davidmckayv wants to merge 9 commits into
Conversation
… API An organization invites people by email address, and the person answers the invitation from their own list, before they are a member. The address that added an existing person by email is replaced by invitations. An organization says whether it is the caller's own, an admin can rename it, and a member can be removed or leave.
For an app's token the list marks active the organization its OpenBot-Organization header names, or the caller's own with none. Only an API key has no active organization. Switching with a token checks membership, stores nothing and answers the organization.
Organization settings (Settings, Organization) shows the organization the person is working in: its name, renamed from a dialog by its owner and admins, its members with their roles, and the invitations it sent with Copy link and Cancel. An owner or admin invites an address with a role and reads what happened in the same dialog: OpenBot emailed it, or there is a link to pass on. A member reads the name and the members, and may leave, after which the app works in another of their organizations from home. Invitations lists what is waiting for the person, with Accept and Decline. Accepting keeps them working where they were and offers the switch. The page an invitation's link opens (/invitations/<id>) says what happened to that one invitation in every state, and what to check when there is none. The account menu draws the organizations wherever OpenBot lists them, marks the person's own, and adds Organization settings and, when invitations are waiting, Invitations with their count. The personal edition shows none of this.
Somebody invited by email opens the link before they have signed in, or before they have an account. The invitation is remembered in the tab while they sign in and answer onboarding, and home hands them on to it once. Only an invitation's own address is kept or followed.
Adding an existing person by email was described before any release and is replaced by invitations, so the gate lets that one removal through.
A member says whether their membership can end, as the server's verdict: the owner stays, so nobody is offered to leave their own organization, and so does somebody OpenBot's settings keep as an admin. The members screen offers Leave and Remove by that.
An owner makes another member an owner, and can step down once another owner exists. The organization always keeps an owner, and a person's own organization keeps exactly its one. Each member says which roles the caller may give them.
Each member's row offers a Role menu listing the roles the API says the person looking may give them (assignableRoles), by name. Making somebody an owner, and stepping down from owner, are asked about first and say what it means. Other changes apply at once. A refusal is shown in its own sentence, in the dialog or under the members list. Rows with no assignable roles draw nothing extra. The organizations list is read again after a change, because the role that changed can be the person's own.
davidmckayv
force-pushed
the
orgs/own-organization-invitations-api
branch
from
November 15, 2026 22:20
77d6cef to
23616db
Compare
Remove took a person's access away on one click. It now opens a confirm dialog that names the person (their name, or their address when they have none) and says what ends: they are signed out everywhere and can't sign in again, and their API keys, app sign-ins and connected credentials stop working. Cancel changes nothing, the confirm button shows the pending state, and a refusal is said in the dialog. Restore still applies at once, since it ends nothing. The Remove and Restore buttons are now named for the person they act on, so each row's button can be told apart.
davidmckayv
added a commit
that referenced
this pull request
Nov 16, 2026
…ory and Learning, one's own organization and invitations, teams, and Desktop connected to a remote OpenBot (#1705) Organizations, phase 2, fused into one branch: each organization governs itself, memory and Learning are kept per organization, an organization of one's own at first sign-in with invitations, teams inside an organization, and OpenBot Desktop connected to an OpenBot that runs somewhere else. This branch merges, at their current heads: - #1701 Say in the spec and Admin that each organization governs itself - #1697 Say in the API that memory and Learning are kept per organization - #1700 Invitations, organization settings and an organization of one's own in the app - #1699 Teams inside an organization: the API, the screens, and granting to a team - #1698 Add an API keys page to Settings, and say what OAuth needs in the spec - #1702 Connect OpenBot Desktop to an OpenBot that runs somewhere else - main, with #1704 On top of the merges: - The spec bundled once and the clients generated again from it, keeping every piece's additions in the shared spec files. - The teams tests' organization and member fixtures carry the fields an organization and a member answer with (`personal`, `removable`, `assignableRoles`). - The rust-toolchain action's pin is commented with the tag it is (`v1`), as the static analysis of the workflows asks. Checked locally: format, lint, typecheck, API lint, the teams, Learning and audit tests. Draft: the pieces' own PRs stay open; this lands them together after one end-to-end test.
Contributor
Author
|
Carried in #1705. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changes
Everybody has an organization of their own, and people join another one by invitation.
emailed) or the inviter should pass the link on (link).addOrganizationMemberis gone.PATCH /api/v2/organizations/{organizationId}/profilegives an organization a new name. Its id and slug stay.DELETE /api/v2/organizations/{organizationId}/members/{personId}, withmeto leave. The owner stays.PATCH /api/v2/organizations/{organizationId}/members/{personId}. An owner makes another member an owner and can step down once another owner exists. The organization always keeps an owner, and a person's own organization keeps exactly its one.removable) and which roles the caller may give them (assignableRoles). The members screen offers Leave, Remove and a Role menu by those, with a confirm for making an owner and for stepping down.personalon an organization says whether it is the caller's own.The caller's invitations sit at
/api/v2/people/me/invitations, outside an organization's address, because a person answers one before they are a member. The lint rule that keeps every path under an organization allows these four paths beside the caller's own organizations.For an app's token, the organizations list marks active the organization its
OpenBot-Organizationheader names, or the caller's own with none. Only an API key has no active organization.Screens
/invitations). What is waiting for the person, with Accept and Decline. Accepting keeps them working where they were and offers the switch./invitations/<id>). That one invitation in every state: waiting, accepted, declined, canceled, expired, or not found.Checks
bun run api:lint,bun run lint,bun run format:checkandbun run typecheckpass.bun run api:generate.bun test apppasses, with new tests for the data layer, the screens' states and the kept link.Known